package com.chc.web.fee_power.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chc.valid.listValue;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created with IntelliJ IDEA
 *
 * @Author: chc
 * @Date: 2022/01/17/15:17
 * @Description:
 */
@Data
@TableName("fee_power")
public class FeePower implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long powerId;
    //房屋id
    @NotNull
    private Long houseId;
    //用户id
    private Long userId;
    //所属月份
    @NotBlank
    private String payPowerMonth;
    //缴费金额
    @NotNull
    private BigDecimal payPowerMoney;
    //表显
    @NotBlank
    private String powerNum;
    //缴费状态
    @NotBlank
    @listValue(values = {"1","0"}) //字段只能是0或1
    private String payPowerStatus;
    //缴费时间
    private Date payPowerTime;

    @TableField(exist = false)
    private String loginName;

    @TableField(exist = false)
    private String phone;

    @TableField(exist = false)
    private String houseNum;

    @TableField(exist = false)
    private String unitName;

    @TableField(exist = false)
    private Long buildId;

    @TableField(exist = false)
    private Long unitId;

    @TableField(exist = false)
    private String name;
}
